
APPOBJ = ../obj
APPBIN = ../bin
APPINC = .

DSINC = ../lib/ds/src

INST_TRILINOS = /home/prj/mvgeo/libs/trilinos-6.0.10
DEFAULT_INCLUDES = $(INST_TRILINOS)/LINUX_MPI/include
DID_INCLUDE = $(INST_TRILINOS)/packages/didasko/src
DID_INCLUDE2 = $(INST_TRILINOS)/LINUX_MPI/packages/didasko/src

DIR_LIBS = $(INST_TRILINOS)/LINUX_MPI/lib

INCLUDES = -I$(DEFAULT_INCLUDES) -I$(DID_INCLUDE) -I$(DID_INCLUDE2) -I$(APPINC)

CXX = g++
DEFS = -DHAVE_CONFIG_H
CPPFLAGS =
CXXFLAGS = -g -Wall

CXXCOMPILE = $(DEFS) $(INCLUDES) \
        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)

SRCS =  main.cpp \
	nfibd.cpp \
	shp.cpp \
	shpbrk8.cpp

OBJS =	$(addprefix $(APPOBJ)/, $(SRCS:.cpp=.o))


DEFAULT_LIBS = \
  $(DIR_LIBS)/libnoxepetra.a \
  $(DIR_LIBS)/libnox.a \
  $(DIR_LIBS)/libml.a  \
  $(DIR_LIBS)/libifpack.a \
  $(DIR_LIBS)/libamesos.a \
  $(DIR_LIBS)/libaztecoo.a \
  $(DIR_LIBS)/libepetraext.a \
  $(DIR_LIBS)/libtriutils.a \
  $(DIR_LIBS)/libepetra.a \
  $(DIR_LIBS)/libteuchos.a \
  -llapack -lblas 

FFLAGS = -lm
FLIBS =  -L/opt/lam-7.0/lib -L/usr/lib/gcc-lib/i386-redhat-linux/3.3.2 \
         -L/usr/lib/gcc-lib/i386-redhat-linux/3.3.2/../../.. \
         -lg2c -lm -lgcc_s -lpthread
#
# Rules
#

$(APPBIN)/sfem.exe:	$(OBJS)
		$(CXX) -o $@ $(OBJS)

$(APPOBJ)/%.o	:	%.cpp
			$(CXX) -c $(CXXCOMPILE) -o $@ $<

